package com.yilijk.base;

import static com.yilijk.base.utils.DevicesUtils.DEVICES_UUID;
import static com.yilijk.base.utils.DevicesUtils.getUUID;

import android.app.Application;
import android.app.SharedElementCallback;
import android.text.TextUtils;

import com.alibaba.android.arouter.launcher.ARouter;
import com.yilijk.base.crash.CrashHandlerUtils;
import com.yilijk.base.utils.ALog;
import com.yilijk.base.utils.OpenUtils;
import com.yilijk.base.utils.SharedPreferencesUtils;

/**
 * Created by SHICHENG
 * <p>
 * Time on 2022/03/07
 */
public class AppBase {

    private static Application mApplication;

    public static void init(Application application){
        mApplication = application;
//        if (TextUtils.isEmpty(DEVICES_UUID)) {
//            DEVICES_UUID = getUUID(application);
//        }
        ARouter.init(application);
        SharedPreferencesUtils.initSpUtils(application);
        CrashHandlerUtils.getInstance().init(application, "/Android/data/com.yljk.yljkproject/files/");
    }

    public static void setEnable(boolean b){
        ALog.isEnableLog = b;
        CrashHandlerUtils.getInstance().isEnable(b);

    }


    public static Application getApplication() {
        return mApplication;
    }
}
